package com.github.baichuan.file.rest.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

@Schema(title = "Base64文件数据")
@Getter
@Setter
public class Base64File {
    @Schema(title = "文件对象Id", requiredMode = NOT_REQUIRED, description = "如果没有设置文件对象Id系统会自动生成")
    private String fileId;

    @Schema(title = "文件名", requiredMode = REQUIRED)
    @NotBlank(message = "文件名不能为空")
    private String name;

    @Schema(title = "文件内容类型", requiredMode = REQUIRED)
    @NotBlank(message = "文件内容类型不能为空")
    private String mime;

    @Schema(title = "文件内容Base64编码", required = true)
    @NotBlank(message = "文件内容不能为空")
    private String base64;
}
